The use count is in the last column of the program's output:
999 Bob 120 3 111 Jill 870 4
public
Visibility Modifier
The private
visibility modifier keeps outsiders from looking in.
However,
the access methods are intended for outsiders,
and must be visible to outsiders in order to be useful.
The public
access modifier
explicitly says that a method or variable of an object can
be accessed by code outside of the object.
The public
visibility modifier is usually used for all
access methods and constructors in a class definition.
Most variables are made private
.
Here is a skeleton of the CheckingAccount
class:
Pick a visibility modifier for the constructor and for each of the methods.